package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.ZjWorkFeeDetail;
import com.zb.extend.WorkFeeDetailExtend;
import com.zb.mobile.NetworkMobileApplyOrderFeeDetailVo;
import com.zb.vo.*;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 工单费用信息表 服务类
 * </p>
 *
 * @author WEN
 * @since 2023-10-25
 */
public interface ZjWorkFeeDetailService extends IService<ZjWorkFeeDetail> {

    /**
     * 保存、修改、删除工单费用详情
     * @param custAccId 商家ID
     * @param workFeeId 工单费用表ID
     * @param workId 工单ID
     * @param feeDetails
     * @param ids 删除的费用详情ID
     */
    void save(Long custAccId, Long workFeeId, Long workId, List<WorkFeeDetailVo> feeDetails, List<Long> ids);

    /**
     * 保存移动端服务商申请工单费用
     * @param custAccId 商家ID
     * @param workFeeId 工单费用ID
     * @param workId 工单ID
     * @param orderFeeDetailVos
     */
    void saveMobileNetworkFee(Long custAccId, Long workFeeId, Long workId, List<NetworkMobileApplyOrderFeeDetailVo> orderFeeDetailVos);

    /**
     * 根据工单费用表ID获取工单费用信息
     * @param workFeeIds 工单费用表ID
     * @return
     */
    List<WorkFeeDetailExtend> getByWorkFeedIds(List<Long> workFeeIds);

    /**
     * 根据工单费用表ID获取工单费用信息
     * @param workFeeId 工单费用表ID
     * @return
     */
    List<WorkFeeDetailExtend> getByWorkFeedId(Long workFeeId);

    /**
     * 根据服务项目ID获取服务费用项目详情的项目信息
     *
     * @param workFeeId 服务项目ID
     * @return
     */
    List<WorkFeeDetailInfoVo> getOrderFeeDetailProjectInfo(Long workFeeId);

    /**
     * 根据Id打印
     * @param workFeeId
     * @return
     */
    List<ExpenseRecordVo> getByWorkOrderId(Long workFeeId);

    /**
     * 审核服务费用项目信息
     * @param orderFeeCheckVo
     */
    void checkOrderFee(Long custAccId, OrderFeeCheckVo orderFeeCheckVo);

    /**
     * 根据工单费用项目表ID获取关联的费用项目ID
     * @param workFeeProjectIds 工单费用项目表ID
     * @return
     */
    List<Long> getByWorkFeeProjectId(List<Long> workFeeProjectIds);

    /**
     * 根据工单ID获取工单服务费用（注：根据工单费用ID分组查询）
     * @param workIds 工单ID
     * @return
     */
    List<WorkFeeDetailExtend> getGroupByWorkIds(List<Long> workIds);

    /**
     * 根据工单ID获取工单服务费结算价
     * @param workId 工单ID
     * @return
     */
    ZjWorkFeeDetail getOrderSettlementFeeByWorkId(Long workId);

    /**
     * 根据工单ID获取工单服务费结算价
     * @param workIds 工单ID
     * @return
     */
    List<ZjWorkFeeDetail> getOrderSettlementFeeByWorkId(List<Long> workIds);

    /**
     * 根据工单ID获取异常费用，即服务商申请的费用
     * @param workIds 工单ID
     * @return
     */
    List<ZjWorkFeeDetail> getExceptionFeeByWorkIds(List<Long> workIds);

    /**
     * 根据工单ID获取费用信息
     * @param workId 工单ID
     * @return
     */
    List<WorkFeeDetailExtend> getByWorkId(Long workId);

    /**
     * 根据工单ID & 工单费用项目ID查询
     * @param workId 工单ID
     * @param workFeeProjectId 工单费用项目ID
     * @return
     */
    ZjWorkFeeDetail getByWorkIdAndWorkFeeProjectId(Long workId, Long workFeeProjectId);
}
